package org.example.feign;

import org.example.entity.Cart;
import org.example.entity.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient("cart-server")
public interface CartServerService {
    @PostMapping("/CartController/findAllByUidOrByUidAndBid")
    public CommonResult<List<Cart>> findAllByUidOrByUidAndBid(@RequestParam("uid") String uid,
                                                              @RequestParam(value ="bid" ,required = false) String bid);
        @PostMapping("/CartController/removeCart")
        @CrossOrigin
        public CommonResult<Integer> deleteByUidAndBidAndFidOrByUidAndBid(@RequestParam("uid") String uid,
                                                                          @RequestParam("bid") String bid,
                                                                          @RequestParam(value ="fid" ,required = false) Integer fid);

    }
